refactor: remove unused exports and dead code - #549
Merged
Merged
Conversation
Remove `export` keyword from 350 declarations that have no external consumers (not imported by any other file in src/ or tests/). This reduces the public API surface, making the codebase easier to navigate and preventing accidental coupling to internal implementation details. Modules affected: transforms (57), studio (51), server (37), utils (24), rendering (24), build (22), platform (21), agent (18), workflow (15), html (12), react (11), cache (10), routing (9), tool (6), proxy (6), modules (6), types (4), security (4), skill (3), observability (3), discovery (3), testing (2), errors (2), integrations (1), embedding (1).
After removing unused exports, the linter revealed 47 functions, classes, and constants that were completely dead — not used internally either. Deleted them along with cascading dead code (e.g., testing/isolation.ts lost ~600 lines of env overlay infrastructure that was only reachable through the removed installTestIsolation entry point).
- Remove destroyVendorCache no-op stub and its caller in build-cleanup - Remove unused MAX_KEY_DISPLAY_LENGTH (orphaned after withCacheSpan deletion) - Remove unused WARMUP_TTL_SECONDS (orphaned after warmupTransformCache deletion)
kojiwakayama
force-pushed
the
chore/dead-export-cleanup
branch
from
March 7, 2026 16:30
93f13c4 to
e720214
Compare
- Delete unused DATA_NODE_END_LINE/DATA_NODE_END_COLUMN constants - Delete unused openMarkdownSourceInStudio function - Delete unused applyMarkdownHistoryCommand function
- Re-export BorderStyle type from box.ts (used by cli/ui/components/table.ts) - Remove trailing blank line in vendor-cache.ts (deno fmt)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
exportkeyword from 350 declarations across 180 files that have zero external consumers (not imported by any other file insrc/ortests/)Approach
src/rg -wwhether any other file references itexportkeyword from 350 unused exportstesting/isolation.tslost ~600 lines of env overlay infrastructure only reachable through the removedinstallTestIsolation)Modules affected
Test plan
deno lint src/— zero errorsdeno check src/index.ts— no new type errors (3 pre-existing generated file errors unchanged)deno test src/— no test regressions (299 pass vs 298 on main)